var QC = function () {
    var n = function () {
    };
    var c = window.ActiveXObject && ~~navigator.userAgent.match(/MSIE\s+(\d+)/)[1];
    var b = function () {
        var p = function (t) {
            var r = [], s = arguments.callee._temp = arguments.callee._temp || document.createElement("div");
            s.innerHTML = t;
            while (s.firstChild) {
                r.push(s.removeChild(s.firstChild))
            }
            return r.length > 1 ? function () {
                var v = document.createDocumentFragment();
                for (var u = 0; u < r.length; u++) {
                    v.appendChild(r[u])
                }
                return v
            }() : r[0]
        };
        var q = function (s, r) {
            return s.replace(arguments.callee._reg, function (t, u) {
                return r[u] !== null ? r[u] : u
            })
        };
        q._reg = /\{(\w+)\}/g;
        return{str2dom:p, format:q, extend:function (s, r) {
            var t = n;
            t.prototype = r.prototype;
            s.prototype = new t();
            s.constructor = s;
            return s
        }}
    }();
    var l = function () {
        var s = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, q = {"\b":"\\b", "\t":"\\t", "\n":"\\n", "\f":"\\f", "\r":"\\r", '"':'\\"', "\\":"\\\\"};

        function p(t) {
            s.lastIndex = 0;
            return s.test(t) ? '"' + t.replace(s, function (u) {
                var v = q[u];
                return typeof v === "string" ? v : "\\u" + ("0000" + u.charCodeAt(0).toString(16)).slice(-4)
            }) + '"' : '"' + t + '"'
        }

        function r(x) {
            var u = [], t = "";
            for (var w in x) {
                t = x[w];
                t = t !== undefined ? t : "";
                switch (typeof t) {
                    case"string":
                        t = p(t);
                        break;
                    case"object":
                        t = r(t);
                        break;
                    case"function":
                        continue
                }
                u.push('"' + w + '":' + t)
            }
            return"{" + u + "}"
        }

        return{stringify:function () {
            return window.JSON && JSON.stringify ? JSON.stringify : r
        }(), parse:function (v) {
            v = v || "{}";
            var t = {};
            try {
                t = (new Function("return (" + v + ")"))()
            } catch (u) {
                h.error("JSON.parse => parse数据格式错误:" + v)
            }
            return t
        }}
    }();
    var i = function () {
        if (document.implementation.hasFeature("XPath", "3.0")) {
            XMLDocument.prototype.selectNodes = function (t, u) {
                if (!u) {
                    u = this
                }
                var r = this.createNSResolver(this.documentElement);
                var q = this.evaluate(t, u, r, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
                var v = [];
                for (var s = 0; s < q.snapshotLength; s++) {
                    v[s] = q.snapshotItem(s)
                }
                return v
            };
            Element.prototype.selectNodes = function (q) {
                if (this.ownerDocument.selectNodes) {
                    return this.ownerDocument.selectNodes(q, this)
                } else {
                    throw"For XML Elements Only"
                }
            }
        }
        var p = function (u) {
            var w = c ? new ActiveXObject("Microsoft.XMLDOM") : document.implementation.createDocument("text/xml", "", null);
            if (c) {
                if (w.loadXML(u)) {
                    return w
                } else {
                    return null
                }
            } else {
                try {
                    var v = w.childNodes;
                    for (var s = v.length - 1; s >= 0; s--) {
                        w.removeChild(v[s])
                    }
                    var x = new DOMParser();
                    var r = x.parseFromString(u, "text/xml");
                    var t = w.importNode(r.documentElement, true);
                    w.appendChild(t);
                    return w
                } catch (q) {
                    return null
                }
            }
        };
        return{stringify:function (q) {
            return q.xml || new XMLSerializer().serializeToString(q)
        }, parse:p}
    }();
    var o = function () {
        return{extend:function () {
            var w = arguments, u = arguments.length, y = false, t = 1, v = w[0], q, p, x, s;
            if (typeof v === "boolean") {
                y = v;
                v = arguments[1] || {};
                t = 2
            }
            if (typeof v !== "object" && typeof v !== "function") {
                v = {}
            }
            if (u === t) {
                v = {};
                --t
            }
            for (; t < u; t++) {
                if ((q = arguments[t]) != null) {
                    for (var r in q) {
                        p = v[r];
                        s = q[r];
                        if (v === s) {
                            continue
                        }
                        if (y && s && typeof s === "object" && !s.nodeType) {
                            if (p) {
                                x = p
                            } else {
                                if (s instanceof Array) {
                                    x = []
                                } else {
                                    if (typeof s === "object") {
                                        x = {}
                                    } else {
                                        x = s
                                    }
                                }
                            }
                            v[r] = object.extend(y, x, s)
                        } else {
                            if (s !== undefined) {
                                v[r] = s
                            }
                        }
                    }
                }
            }
            return v
        }}
    }();
    var d = function () {
        var q = /"/g;
        var p = {genHttpParamString:function (r) {
            return this.commonDictionaryJoin(r, null, null, null, window.encodeURIComponent)
        }, splitHttpParamString:function (r) {
            return this.commonDictionarySplit(r, null, null, null, window.decodeURIComponent)
        }, commonDictionarySplit:function (F, u, r, E, x) {
            var z = {}, v, A, D, C, B;
            if (!F || typeof(F) != "string") {
                return z
            }
            if (typeof(u) != "string") {
                u = "&"
            }
            if (typeof(r) != "string") {
                r = ""
            }
            if (typeof(E) != "string") {
                E = "="
            }
            v = F.split(u);
            if (v && v.length) {
                for (var w = 0, y = v.length; w < y; ++w) {
                    A = v[w].split(E);
                    if (A.length > 1) {
                        C = A.slice(1).join(E);
                        D = C.split(r);
                        B = D.slice(r.length, D.length - r.length).join(r);
                        z[A[0]] = (typeof x == "function" ? x(B) : B)
                    } else {
                        A[0] && (z[A[0]] = true)
                    }
                }
            }
            return z
        }, commonDictionaryJoin:function (u, s, r, A, w) {
            var x = [], z, y;
            if (!u || typeof(u) != "object") {
                return""
            }
            if (typeof(u) == "string") {
                return u
            }
            if (typeof(s) != "string") {
                s = "&"
            }
            if (typeof(r) != "string") {
                r = ""
            }
            if (typeof(A) != "string") {
                A = "="
            }
            for (var v in u) {
                y = (u[v] + "").replace(q, '\\"');
                x.push(v + A + r + (typeof w == "function" ? w(y) : y) + r)
            }
            return x.join(s)
        }};
        return{stringify:function (r) {
            return p.genHttpParamString(r)
        }, parse:function (r) {
            return p.splitHttpParamString(r)
        }, getParameter:function (t) {
            var u = new RegExp("(\\?|#|&)" + t + "=([^&#]*)(&|#|$)"), s = location.href.match(u);
            return decodeURIComponent(!s ? "" : s[2])
        }}
    }();
    var e = function () {
        var p = [/&/g, /</g, />/g, /\x27/g, /\x22/g], q = ["&amp;", "&lt;", "&gt;", "&#039;", "&quot;"];
        return{escHTML:function (u) {
            var s = u;
            for (var t = 0, r = p.length; t < r; t++) {
                s = s.replace(p[t], q[t])
            }
            return s
        }, format:b.format}
    }();
    var k = function () {
        var p = document.domain || "";
        return{set:function (s, u, t, v, q) {
            if (q) {
                var r = new Date();
                r.setTime(r.getTime() + 3600000 * q)
            }
            document.cookie = s + "=" + u + "; " + (q ? ("expires=" + r.toGMTString() + "; ") : "") + (v ? ("path=" + v + "; ") : "path=/; ") + (t ? ("domain=" + t + ";") : ("domain=" + p + ";"));
            return true
        }, get:function (s) {
            var t = new RegExp("(?:^|;+|\\s+)" + s + "=([^;]*)"), q = document.cookie.match(t);
            return(!q ? "" : q[1])
        }, del:function (q, r, s) {
            document.cookie = q + "=; expires=Mon, 26 Jul 1997 05:00:00 GMT; " + (s ? ("path=" + s + "; ") : "path=/; ") + (r ? ("domain=" + r + ";") : ("domain=" + p + ";"))
        }}
    }();
    var h = function () {
        var r = {log:3, info:2, warn:1, error:0};
        var t = r.info;
        var p = " :: [QQConnect] > ";
        var s = function (u) {
            return function (v) {
                window.console && console[u] && q() >= r[u] && console[u](p + v)
            }
        };
        var q = function () {
            return~~(t || r.info)
        };
        return{log:s("log"), info:s("info"), warn:s("warn"), error:s("error"), setLevel:function (u) {
            return t = r[u] || t
        }}
    }();
    var m = function () {
        var r;

        function p() {
            p.fired = true;
            var s;
            while (s = p.list.shift()) {
                s()
            }
        }

        p.list = [];
        p.fired = false;
        function q() {
            if (r) {
                return
            }
            r = true;
            if (document.addEventListener) {
                document.addEventListener("DOMContentLoaded", function () {
                    document.removeEventListener("DOMContentLoaded", arguments.callee, false);
                    p()
                }, false)
            } else {
                if (document.attachEvent) {
                    document.attachEvent("onreadystatechange", function () {
                        if (document.readyState === "complete" || document.readyState === "loaded") {
                            document.detachEvent("onreadystatechange", arguments.callee);
                            p()
                        }
                    });
                    if (document.documentElement.doScroll) {
                        (function () {
                            try {
                                document.documentElement.doScroll("left");
                                document.body.appendChild
                            } catch (s) {
                                if (!p.fired) {
                                    setTimeout(arguments.callee, 0)
                                }
                                return
                            }
                            p()
                        })()
                    }
                }
            }
        }

        q();
        return{domReady:function (s) {
            if ((typeof(s) == "function")) {
                if (p.fired || document.readyState === "complete" || document.readyState === "loaded") {
                    p();
                    s()
                } else {
                    p.list.push(s)
                }
            }
        }, add:function (u, t, s) {
            if (u && t && s) {
                u && u.addEventListener ? u.addEventListener(t, s, false) : u.attachEvent("on" + t, s)
            }
        }, remove:function (u, t, s) {
            if (u && t && s) {
                u && u.removeEventListener ? u.removeEventListener(t, s, false) : u.detachEvent("on" + t, s)
            }
        }}
    }();
    var f = function () {
        return{_insertButton:n}
    };
    var j = function () {
        return{}
    };
    var g = function (q, r, p) {
        setTimeout(function () {
            g.send(q, r, p)
        }, 0)
    };
    g.send = function (z, E, p) {
        var C = "http://pingfore.qq.com/pingd";
        var v = "?cc=-&ct=-&java=1&lang=-&pf=-&scl=-&scr=-&tt=-&tz=-8&vs=3.3&flash=&";
        var x = /(?:^|;+|\s+)pgv_pvid=([^;]*)/i;
        var s, B, q, u, w, y, r, D, A;
        p = p || {};
        B = z || location.hostname || "-";
        q = E || "/open/connect/error_path";
        u = p.referDomain || location.hostname;
        w = p.referPath || location.pathname;
        r = Math.random();
        D = document.cookie.match(x);
        if (D && D.length && D.length > 1) {
            y = D[1]
        } else {
            y = (Math.round(Math.random() * 2147483647) * (new Date().getUTCMilliseconds())) % 10000000000;
            document.cookie = "pgv_pvid=" + y + "; path=/; domain=" + location.hostname + "; expires=Sun, 18 Jan 2038 00:00:00 GMT;"
        }
        A = new Image();
        A.onload = A.onerror = function () {
            A.onload = A.onerror = null;
            A = null
        };
        A.src = C + v + "dm=" + B + "&url=" + q + "&rdm=" + u + "&rurl=" + escape(w) + "&pgv_pvid=" + y + "&sds=" + r
    };
    var a = function (r, p, q, s) {
        setTimeout(function () {
            a.send(r, p, q, s)
        }, 0)
    };
    a.send = function (s, p, r, t) {
        var u = "http://isdspeed.qq.com/cgi-bin/v.cgi", v, q;
        t = t || {};
        v = ["flag1=" + s, "flag2=" + p, "flag3=" + r, "1=" + (t.reportRate || 1), "2=" + (t.duration || 1000), "sds=" + Math.random()];
        q = new Image();
        q.onload = q.onerror = function () {
            q.onload = q.onerror = null;
            q = null
        };
        q.src = u + "?" + v.join("&")
    };
    return{Like:f(), Share:j(), Toolkit:b, JSON:l, XML:i, Object:o, QueryString:d, String:e, Cookie:k, Console:h, Event:m, pv:g, valueStat:a, getVersion:function () {
        return"1.0.1"
    }}
}();
(function (e) {
    var j = QC.getVersion();
    var D = function (i) {
        return typeof(i) == "string" ? document.getElementById(i) : i
    };
    var z = "qzonestyle.gtimg.cn", o = "qzs.qq.com";
    var p;
    var F = function (i) {
        return p && (p.dataset && p.dataset[i] || p.getAttribute("data-" + i))
    };
    var m;
    !(function () {
        m = ~~e.QueryString.getParameter("__qc_wId") || ~~e.Cookie.get("__qc_wId");
        if (!m) {
            var i = +new Date() % 1000;
            document.cookie = ["__qc_wId=" + i, "; path=/"].join(";")
        }
    })();
    var I = /\/qzone\/openapi\/qc(?:[^/_]*)\.js(?:[?#]appId=(\d+))?/i;
    var n = document.getElementsByTagName("script");
    for (var N = 0, f, L = n.length; N < L; N++) {
        f = n[N];
        var v = f.src || "";
        var x = v.match(I);
        if (x) {
            p = f;
            break
        }
    }
    var t = e.Toolkit, r = e.JSON, G = e.XML, q = e.Object, c = e.QueryString, K = e.String, g = e.Cookie, k = e.Console;
    var R = function () {
    };
    var C = window.ActiveXObject && ~~navigator.userAgent.match(/MSIE\s+(\d+)/)[1];
    var H = {PMCrossPage:"https://graph.qq.com/jsdkproxy/PMProxy.html#" + j, FLACrossPage:"https://graph.qq.com/jsdkproxy/FLAProxy.swf", getCrossSolution:function () {
        var i;
        if (window.postMessage) {
            i = "PMProxy"
        } else {
            if (!!((window.ActiveXObject && !!function () {
                var l = true;
                try {
                    new ActiveXObject("ShockwaveFlash.ShockwaveFlash")
                } catch (T) {
                    l = false
                }
                return l
            }()) || (navigator.plugins && navigator.plugins["Shockwave Flash"]) || false)) {
                i = "FLAProxy"
            } else {
                e.Console.error("未找到可用的跨域通信方案");
                i = "EMPProxy"
            }
        }
        e.Console.info("确定跨域代理策略：" + i);
        return i
    }};
    var P = 1000;
    e.getConfig = function () {
        return H
    };
    var S = function (T, l, i, U) {
        this.uri = T;
        this.paras = l || {};
        this.fmt = i || "json";
        this.method = (U || "get").toLocaleLowerCase();
        this.successPool = [];
        this.errorPool = [];
        this.completePool = [];
        this.seq = P++
    };
    S.prototype.success = function (i) {
        this.successPool.push(i);
        return this
    };
    S.prototype.error = function (i) {
        this.errorPool.push(i);
        return this
    };
    S.prototype.complete = function (i) {
        this.completePool.push(i);
        return this
    };
    S.prototype.send = R;
    S.prototype._onCallback = function (V, i, T) {
        if (V.status == 200 || V.status == 204) {
            var U = V.responseText, l = new B(U, V.status, i, T);
            !~~l.code ? this.onSuccess(l) : this.onError(l)
        } else {
            this.onError(new B("", V.status, i, T))
        }
    };
    S.prototype.onSuccess = function (l) {
        var U = this.successPool;
        for (var T = 0; T < U.length; T++) {
            U[T](l)
        }
        this.onComplete(l)
    };
    S.prototype.onError = function (l) {
        var U = this.errorPool;
        for (var T = 0; T < U.length; T++) {
            U[T](l)
        }
        this.onComplete(l)
    };
    S.prototype.onComplete = function (l) {
        var U = this.completePool;
        for (var T = 0; T < U.length; T++) {
            U[T](l)
        }
    };
    var B = function (U, l, i, T) {
        this.status = l || -1;
        this.fmt = i || "json";
        this.code = this.ret = -1;
        this.data = null;
        this.seq = T || -1;
        this.parseData(U);
        if (this.code && B[this.code]) {
            B[this.code](this.data, this.dataText)
        }
    };
    B.prototype.parseData = function (l) {
        this.dataText = l;
        switch (this.fmt) {
            case"xml":
                this.data = e.XML.parse(l || "<root></root>");
                var i = this.data.selectNodes("//ret")[0];
                this.code = this.ret = (i && i.firstChild.nodeValue) || -1;
                break;
            case"json":
            default:
                this.data = e.JSON.parse(l || "{}");
                this.code = this.ret = this.data.ret !== undefined ? ~~this.data.ret : this.data.data && this.data.data.ret !== undefined ? ~~this.data.data.ret : -1;
                break
        }
    };
    B.prototype.stringifyData = function () {
        return this.dataText
    };
    B[100013] = function (l, i) {
        e.Login.signOut();
        e.Console.warn("api返回token失效")
    };
    var s = e.Toolkit.extend(function () {
        S.apply(this, arguments);
        this.xhr = s.createInstance()
    }, S);
    e.Object.extend(s.prototype, {send:function () {
        var W = this.xhr, X = this.method, i = this.fmt, U = this, l = e.QueryString.stringify(U.paras), T = X == "post" ? this.uri : this.uri.indexOf("?") < 0 ? this.uri + "?" + l : this.uri.replace(/[&?]*/g, "") + "&" + l;
        W.open(X, T, !!this.async);
        try {
            W.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
            W.setRequestHeader("X-Requested-From", "_TC_QC_jsProxy_")
        } catch (V) {
        }
        W.onreadystatechange = function () {
            if (W.readyState === 4) {
                U._onCallback(W, i, U.seq)
            }
        };
        W.send(l || null)
    }});
    s.createInstance = window.XMLHttpRequest ? function () {
        return new window.XMLHttpRequest()
    } : function () {
        return new window.ActiveXObject("Microsoft.XMLHTTP")
    };
    var E = function () {
        this.requests = [];
        this.invokes = [];
        this.readyPool = [];
        this.isReady = false;
        this.timeStamp = +new Date();
        this.init()
    };
    E.prototype.init = R;
    E.prototype.ready = function (i) {
        this.readyPool.push(i)
    };
    E.prototype.onReady = function () {
        this.isReady = true;
        var T = this.readyPool;
        for (var l = 0; l < T.length; l++) {
            T[l]()
        }
    };
    E.prototype.send = function (l) {
        var i;
        l && (this.requests.push(l));
        while (this.isReady && (i = this.requests.shift())) {
            E.pendingRequests.push(i);
            QC.Console.log("seq no :" + i.seq + "请求发起  ts -> " + (+new Date()));
            this._doSend(i)
        }
    };
    E.prototype._doSend = function (i) {
    };
    E.prototype._preDispatch = function (W, T, l, i) {
        var U = T.data || (T.currentTarget && T.currentTarget.data) || {};
        var V = U.split("@@@");
        switch (V[0]) {
            case"invoke":
                this.invoke(V[1]);
                break;
            default:
                this.dispatch(V[1] || T, l, i);
                break
        }
    };
    E.prototype.invoke = function (l) {
        var i;
        l && (this.invokes.push(l));
        while (this.isReady && (i = this.invokes.shift())) {
            this._doInvoke(i)
        }
    };
    E.prototype._doInvoke = function (i) {
    };
    E.prototype.dispose = function () {
        O = null;
        this.onDispose()
    };
    E.prototype.onDispose = function () {
    };
    E.pendingRequests = [];
    E.dispatchReceive = function (U, X, T, l) {
        var W = E.pendingRequests;
        for (var V = 0; V < W.length; V++) {
            if (W[V].seq == U) {
                QC.Console.log("seq no :" + U + "响应收到  ts -> " + (+new Date()));
                W[V]._onCallback({status:T, responseText:X}, l, U);
                W.splice(V, 1);
                return
            }
        }
    };
    E.invoke = function () {
        var i = [];
        return function (T) {
            T && i.push(T);
            if (!O) {
                e.Console.info("Proxy未初始化，invoke入栈");
                E.generateProxy();
                return
            }
            var l;
            while (l = i.shift()) {
                O._doInvoke(l)
            }
        }
    }();
    var O;
    E.generateProxy = function (l) {
        var i = {PMProxy:y, FLAProxy:J, EMPProxy:w};
        if (l) {
            return new i[l]()
        }
        if (!O) {
            O = new i[H.getCrossSolution()]()
        }
        return O
    };
    E.getFunction = function (l) {
        var U;
        l = l.split(".");
        for (var T = 0; T < l.length; T++) {
            U = U ? U[l[T]] : window[l[T]]
        }
        return U
    };
    e._create_fla_proxy = function () {
        e._create_fla_proxy = R;
        if (!(document._qc_cross_request_flash_proxy || D("_qc_cross_request_flash_proxy"))) {
            new J()
        }
    };
    var J = e.Toolkit.extend(function () {
        E.apply(this, arguments)
    }, E);
    e.Object.extend(J.prototype, {prefix:"_TC_QC_flaProxy_", init:function () {
        var i = this, V = function () {
            var X = window.name.match(/oauth2Login_(\d+)/), Y = ~~e.Cookie.get("__qc_wId"), W;
            if (X && X[1]) {
                W = X[1]
            } else {
                if (window._b_is_qc_cb_win) {
                    W = 10000 + Y
                } else {
                    W = Y;
                    document.cookie = ["__qc_wId=" + W, "; path=/"].join(";")
                }
            }
            e.Console.info("跨域窗口标识号 __qc_wId : " + W);
            return W
        }(), l = V < 10000 ? V + 10000 : V - 10000;
        var U = J.getFlashHtml({src:H.FLACrossPage, width:"100%", height:"100%", allowScriptAccess:"always", id:"_qc_cross_request_flash_proxy", name:"_qc_cross_request_flash_proxy", flashVars:"suffix=" + (this.timeStamp) + "&conId=" + V + "&conId_receive=" + l});
        var T = this.cot = document.createElement("div");
        T.style.cssText = "position:fixed; _position:absolute; top:30px; left:30px; width:3px; height:3px; margin:0; padding:0; display:none;";
        T.innerHTML = U;
        QC.Event.domReady(function () {
            document.body.appendChild(T);
            T.style.display = "block"
        });
        window[this.prefix + "onFlashReady_" + this.timeStamp] = function () {
            e.Console.info("FLAProxy代理创建成功，耗时" + (new Date() - i.timeStamp));
            setTimeout(function () {
                i.isReady = true;
                i.send();
                i.invoke()
            });
            if (!e.Login._check()) {
                document._qc_cross_request_flash_proxy.initConn()
            }
        };
        window[this.prefix + "onFlashRequestComplete_" + this.timeStamp] = function (Y, X, W) {
            setTimeout(function () {
                i._preDispatch(i, Y, X, W)
            })
        };
        window[this.prefix + "onFlashInvokeBack_" + this.timeStamp] = function () {
            var W = arguments;
            setTimeout(function () {
                var X = E.getFunction(W[0]);
                var Y = W[1];
                W[0].indexOf(".") > -1 ? X.apply(null, Y) : X(Y)
            })
        }
    }, _doSend:function (T) {
        var V = T.uri, U = e.QueryString.stringify(T.paras), l = T.seq, i = T.fmt, X = T.method;
        var W = document._qc_cross_request_flash_proxy.httpRequest || D("_qc_cross_request_flash_proxy").httpRequest;
        W ? W(V, U, X, i, l) : (!function () {
            throw new Error("flash proxy 初始化失败")
        }())
    }, dispatch:function (U, T, l) {
        var V = U.currentTarget.data, i = U.type != "complete" ? 404 : 200;
        E.dispatchReceive(T, V, i, l)
    }, _doInvoke:function (l) {
        var i = document._qc_cross_request_flash_proxy.jsCallSwf || D("_qc_cross_request_flash_proxy").jsCallSwf;
        i && i.apply(null, l)
    }});
    J.getFlashHtml = function (i, W, V) {
        var X = [], T = [], U = !!window.ActiveXObject;
        W = W || 9;
        for (var l in i) {
            switch (l) {
                case"noSrc":
                case"movie":
                    continue;
                    break;
                case"id":
                case"name":
                case"width":
                case"height":
                case"style":
                    if (typeof(i[l]) != "undefined") {
                        X.push(" ", l, '="', i[l], '"')
                    }
                    break;
                case"src":
                    if (U) {
                        T.push('<param name="movie" value="', (i.noSrc ? "" : i[l]), '"/>')
                    } else {
                        X.push(' data="', (i.noSrc ? "" : i[l]), '"')
                    }
                    break;
                default:
                    T.push('<param name="', l, '" value="', i[l], '" />')
            }
        }
        if (U) {
            X.push(' classid="clsid:', V || "D27CDB6E-AE6D-11cf-96B8-444553540000", '"')
        } else {
            X.push(' type="application/x-shockwave-flash"')
        }
        if (location && location.protocol.indexOf("https") < 0) {
            X.push(' codeBase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=', W, '"')
        }
        return"<object" + X.join("") + ">" + T.join("") + "</object>"
    };
    var d = "https://graph.qq.com", b = "http://qzonestyle.gtimg.cn";
    var y = e.Toolkit.extend(function () {
        E.apply(this, arguments)
    }, E);
    e.Object.extend(y.prototype, {init:function () {
        var l = this;
        l._connFrame = document.createElement("iframe");
        l._connFrame.style.cssText = "width:0px; height:0px; display:none; overflow:hidden;";
        var i = function () {
            i.fire();
            i.fire = R
        };
        i.fire = function () {
            e.Console.info("PMProxy代理创建成功，耗时" + (new Date() - l.timeStamp));
            l.isReady = true;
            l.send();
            l.invoke()
        };
        l._connFrame.onload = i;
        l._connFrame.addEventListener && l._connFrame.addEventListener("load", i, false);
        l._connFrame.attachEvent && l._connFrame.attachEvent("onload", i);
        l._connFrame.src = H.PMCrossPage;
        QC.Event.domReady(function () {
            document.body.appendChild(l._connFrame)
        });
        var T = function (U) {
            if (U.origin && (U.origin == d || U.origin == b)) {
                l._preDispatch(l, U)
            }
        };
        window.addEventListener ? window.addEventListener("message", T, false) : window.attachEvent("onmessage", T)
    }, _doSend:function (i) {
        var l = e.QueryString.stringify({uri:i.uri, paras:e.QueryString.stringify(i.paras), fmt:i.fmt, method:i.method});
        this._connFrame.contentWindow.postMessage(l, d)
    }, dispatch:function (X) {
        var U = X.data, W = U.split(":<.<<#:"), T = W[0], l = W[1], i = W[2], V = W[3];
        e.Console.log("data:\t" + V);
        E.dispatchReceive(T, V, l, i)
    }, _doInvoke:function (V) {
        e.Console.log("invoke:\t" + V);
        if (typeof V != "string") {
            return
        }
        var T = V.split("#"), i = T[0], l = T[1] && T[1].split(","), U;
        U = E.getFunction(i);
        U.apply(null, l)
    }, onDispose:function () {
        this._connFrame.parentNode.removeChild(this._connFrame);
        this._connFrame = null
    }});
    var w = e.Toolkit.extend(function () {
        E.apply(this, arguments)
    }, E);
    e.Object.extend(w.prototype, {init:function () {
        e.Console.info("init:" + arguments)
    }, _doSend:function (i) {
        e.Console.info("_doSend:" + arguments)
    }, dispatch:function (i) {
        e.Console.info("dispatch:" + arguments)
    }});
    e.XHRRequest = s;
    e.request = function (T, l, i, U) {
        return new s(T, l, i, U)
    };
    var Q = [];
    e.api = function () {
        var T = [];
        var l = function (U) {
            var V = e.Login._getTokenKeys();
            if (A <= 0) {
                throw new Error("意外的调用了绑定token到req的方法 bindTokenPara")
            }
            U.paras.oauth_consumer_key = A;
            U.paras.access_token = V.accessToken;
            U.paras.openid = V.openid;
            U.paras.format = U.fmt;
            return U
        };
        var i = function (X, W, V, Z) {
            O = E.generateProxy();
            var U = a(X);
            X = U.api || X;
            W = W || {};
            Z = Z || U.method;
            var Y = new S(X, W, V, Z);
            if (A > 0) {
                setTimeout(function () {
                    var aa = e.Login._getTokenKeys();
                    if (aa.openid && aa.accessToken) {
                        O.send(l(Y))
                    } else {
                        T.push(Y);
                        e.Console.warn("openid与accessToken丢失，调用请求入栈 : [" + X + "]，栈大小：" + T.length)
                    }
                }, 10)
            } else {
                T.push(Y);
                e.Console.warn((O.isReady && A < 0 ? "token获取失败，请调用用户登录流程" : "api代理尚未初始化成功") + "，调用请求入栈 : [" + X + "]，栈大小：" + T.length)
            }
            Y.success(function () {
                QC.valueStat(U.statId, 1, 0)
            }).error(function (aa) {
                var ab = aa || {};
                QC.valueStat(U.statId, 1, "number" == typeof ab.ret ? ab.ret : 1)
            });
            return Y
        };
        i._ready = function () {
            e.Console.info("init成功，开始触发api调用堆栈");
            var U;
            while (U = T.shift()) {
                O.send(l(U))
            }
        };
        i.getDoc = function () {
            var V = null, U = function (Y, W) {
                var X = document.createElement("script");
                X.type = "text/javascript";
                X.src = "http://qzonestyle.gtimg.cn/qzone/openapi/qc_jsdkdoc.js";
                document.body.appendChild(X);
                window.on_qc_jsdkdoc_loaded = function (Z) {
                    V = Z;
                    W && W(V[Y]);
                    document.body.removeChild(X);
                    X = null
                }
            };
            return function (X, W) {
                (V && W) ? W(V[X]) : U(X, W || R)
            }
        }();
        return i
    }();
    var u = function () {
        var aa, Z, T;
        var l = {A_XL:{styleId:5, size:"230*48"}, A_L:{styleId:4, size:"170*32"}, A_M:{styleId:3, size:"120*24"}, A_S:{styleId:2, size:"105*16"}, B_M:{styleId:7, size:"63*24"}, B_S:{styleId:6, size:"50*16"}, C_S:{styleId:1, size:"16*16"}};

        function W(af) {
            if (af.clientId) {
                QC.init({appId:af.clientId})
            }
            var al = QC.getAppId();
            if (al < 0) {
                QC.getAppId(arguments);
                return
            }
            af.size = af.size || "B_M";
            var ai = D(af.btnId), an = l[af.size] || l.B_M, ao = an.styleId, aj = af.fullWindow || false, ah = af.btnMode || "standard";
            af.redirectURI = af.redirectURI || h;
            var ag = arguments.callee._getPopupUrl(af);
            var ak = {size:ao, fullWindow:aj, url:ag};
            if (af && af.btnId) {
                if (ai) {
                    ai.innerHTML = arguments.callee.getBtnHtml(ak, ah, af);
                    var am = ai.firstChild.onclick;
                    (ai.firstChild.onclick = function (aq) {
                        var ar, ap = function () {
                            ar && ar.close();
                            QC.Cookie.del("__qc_wId")
                        };
                        window.addEventListener ? window.addEventListener("unload", ap, false) : window.attachEvent("onunload", ap);
                        return function () {
                            if (ar) {
                                ar.close()
                            }
                            ar = aq();
                            if (!ar || true) {
                                e._create_fla_proxy()
                            }
                            QC.pv("graph.qq.com", "/open/connect/click");
                            return false
                        }
                    }(am))
                } else {
                    throw new Error("未找到插入节点:")
                }
            }
        }

        W.TEMPLATE = ['<a href="javascript:;" onclick="{onclick};"><img src="{src}" alt="{alt}" border="0"/></a>'].join("");
        W.getBtnHtml = function (af, ag, ah) {
            return arguments.callee.MODE[ag] && arguments.callee.MODE[ag](af, ah)
        };
        W.getBtnHtml.MODE = {standard:function (ah) {
            var ag = ~~g.get("__qc_wId") + 10000;
            var af = t.format(W.TEMPLATE, {src:"http://" + z + "/qzone/vas/opensns/res/img/Connect_logo_" + ah.size + ".png", onclick:ah.fullWindow ? "return window.open('" + ah.url + "', 'oauth2Login_" + ag + "');" : "return window.open('" + ah.url + "', 'oauth2Login_" + ag + "' ,'height=525,width=585, toolbar=no, menubar=no, scrollbars=no, status=no, location=yes, resizable=yes')", alt:"QQ登录"});
            return af
        }, showUserAfterLogin:function (ak, aj) {
            var af = r.stringify(aj), ai = l[aj.size] || l.B_M, ag = ai.size.split("*"), ah = '<iframe frameBorder="0" scrolling="no" src="http://' + o + "/qzone/openapi/frames/login_button.html#para=" + encodeURIComponent(af) + '" width="' + Math.max(200, ag[0]) + '" height="' + ag[1] + '" allowTransparency="true"></iframe>';
            return ah
        }};
        W._getPopupUrl = function (ak) {
            var aj = ak.scope || "all", ag = ak.redirectURI || "", al = ak.display || "", af = QC.getAppId();
            ag = ag || ("http%3A%2F%2Fqzonestyle.gtimg.cn%2Fqzone%2Fopenapi%2Fredirect-1.0.1.html") || (location.protocol + "//" + location.host + ((location.port && location.port != "80") ? (":" + location.port) : "") + "/qc_callback.html") || "";
            if (C <= 6) {
                ag = "https://graph.qq.com/jsdkproxy/redirect_ie6.html#" + encodeURIComponent(ag)
            }
            var ai = ["client_id=" + af, "response_type=token"], ah = "https://graph.qq.com/oauth2.0/authorize";
            if (aj) {
                ai.push("scope=" + aj)
            }
            if (ag) {
                if (ag.indexOf("://") > 0) {
                    ag = encodeURIComponent(ag)
                }
                ai.push("redirect_uri=" + ag)
            }
            if (al == "mobile") {
                ai.push("display=" + al)
            }
            ah = ah + "?" + ai.join("&");
            return ah
        };
        var V = function () {
            return Z || function () {
                var aj = location && location.hash.match(/access_token=([^&]*)/i), ai, af = [], ag;
                var ah;
                if ((ah = g.get("__qc__k"))) {
                    ag = ah.split("=");
                    if (ah.length && ag.length != 2) {
                        throw new Error("QQConnect -> cookie : __qc__k 格式非法")
                    }
                }
                Z = (aj && aj[1]) || (ag && ag[1])
            }()
        };
        var ae = function () {
            var aj, ag = [];
            V();
            var af = function (ap, ao, am) {
                var an;
                while (an = ag.shift()) {
                    setTimeout(function (aq) {
                        return function () {
                            aq(ap, ao, am)
                        }
                    }(an))
                }
            };
            var al = function (am) {
                k.error(am + " : _getMeError");
                window.callback({error_description:am})
            };
            var ah, ai;
            var ak = function (an) {
                !ai && (ai = window.callback);
                an && ak.cbPool.push(an);
                window.callback = function (ao) {
                    clearTimeout(aj);
                    if (!ao.openid) {
                        return
                    }
                    T = ao;
                    var ar = aa = ao.openid;
                    var aq = Z;
                    k.log(" getMe => openId & accessToken " + [ar, aq, ah ? "通过me接口" : "通过本地"]);
                    var ap;
                    while (ap = ak.cbPool.shift()) {
                        ap(ar, Z, ao)
                    }
                    ah = null;
                    window.callback = ai
                };
                if (!V()) {
                    al("access_token丢失");
                    return
                }
                if (T) {
                    window.callback(T)
                } else {
                    if (ah) {
                        return
                    }
                    ah = document.createElement("script");
                    ah.type = "text/javascript";
                    ah.src = "https://graph.qq.com/oauth2.0/me?access_token=" + Z;
                    ah.onerror = function () {
                        al("me接口返回格式错误")
                    };
                    var am = document.getElementsByTagName("head")[0];
                    am && am.appendChild(ah);
                    aj = setTimeout(function () {
                        al("me接口超时")
                    }, 5000)
                }
            };
            ak.cbPool = [];
            return function (an, am) {
                am ? ag.unshift(an) : ag.push(an);
                ak(af);
                QC.valueStat(350371, 1, 0)
            }
        }();
        var X = function () {
            T = null;
            Z = undefined;
            ac = null;
            var af;
            for (var ag = 0; ag < i.length; ag++) {
                af = i[ag];
                af()
            }
            QC.valueStat(350370, 1, 0)
        };
        var ad = function (ag) {
            var af = W._getPopupUrl(ag || {});
            QC.valueStat(350369, 1, 0);
            return window.open(af)
        };
        var Y = function (ag, af) {
            QC.Login.fillUserInfo(af.btnId, ag)
        };
        var U = [], i = [], ac;
        var ab = function (ak, aj, af, ai) {
            var ah = arguments;
            !ai && af !== null && i.push(function (am) {
                return function () {
                    var an = [ah[0], null, null, 1];
                    (af || R)(am);
                    ah.callee.apply(null, an)
                }
            }(ak));
            var al;
            var ag = function () {
                for (var am = 0; am < U.length; am++) {
                    al = U[am];
                    al(ac)
                }
            };
            !ai && aj !== null && U.push(function (am) {
                return function (an) {
                    (aj || Y)(an, am)
                }
            }(ak));
            if (!ac) {
                Z ? ae(function (am) {
                    if (am) {
                        QC.api("get_user_info").success(function (an) {
                            ac = an.data;
                            ag()
                        }).error(function (an) {
                            QC.Console.error("Login => getMe 获取数据失败" + an)
                        })
                    } else {
                        W(ak)
                    }
                }) : W(ak)
            } else {
                ac && ag()
            }
            QC.valueStat(350368, 1, 0)
        };
        q.extend(ab, {insertButton:W, getMe:ae, showPopup:ad, signOut:function () {
            aa = "";
            document.cookie = ["__qc__k=", "path=/;"].join(";");
            X()
        }, _getTokenKeys:function () {
            return{openid:aa, accessToken:Z}
        }, check:function () {
            QC.valueStat(350372, 1, 0);
            return!!Z
        }, _check:function () {
            return!!(T && Z && ac)
        }, _onLoginBack:function (ag, af, ah) {
            if (ag && af) {
                aa = ag;
                document.cookie = ["__qc__k=" + ["TC_MK", af].join("="), "path=/"].join(";")
            }
            T = {client_id:T && T.client_id || -1, openid:aa};
            V();
            QC.Event.domReady(function () {
                QC.init();
                !ah && QC.Login({}, null, null, 1)
            })
        }, reset:function () {
            U = [];
            i = []
        }, fillUserInfo:function (ai, af) {
            var ah = D(ai), ag = ['<span class="qc_item figure"><img src="{figureurl}" class="{size_key}"/></span>', '<span class="qc_item nickname" style="margin-left:6px;">{nickname}</span>', '<span class="qc_item logout"><a href="javascript:QC.Login.signOut();" style="margin-left:6px;">退出</a></span>'].join("");
            ah && (ah.innerHTML = QC.String.format(ag, {nickname:QC.String.escHTML(af.nickname), figureurl:af.figureurl}))
        }});
        return ab
    };
    e.Login = u();
    var A = -1, M = null, h = "";
    e.init = function (l) {
        l = l || M || {};
        M = l;
        var U = e.Login._getTokenKeys();
        A = l.appId;
        h = l.redirectURI;
        if (!U.openid) {
            E.invoke();
            if (Q.length && l.appId > -1) {
                for (var T = 0; T < Q.length; T++) {
                    Q[T]()
                }
            }
            return
        }
        e.Login.getMe(function (W, i, V) {
            if (!~~V.error && (V.client_id <= 0 || V.client_id % 1000000 == l.appId % 1000000)) {
                A = V.client_id = l.appId || l.clientId || l.app_id || l.client_id || -1;
                e.api._ready && e.api._ready()
            } else {
                e.Console.error(V.error_description || "appId/client_id 不匹配")
            }
        }, true)
    };
    e.getAppId = function (i) {
        if (i) {
            Q.push(function () {
                i.callee.apply(null, i)
            })
        }
        return A
    };
    e.invoke = function () {
        var i = E.generateProxy("FLAProxy");
        i.invoke(arguments)
    };
    var a = function () {
        var i = {get_user_info:{api:"https://graph.qq.com/user/get_user_info", method:"get", statId:350373}, add_topic:{api:"https://graph.qq.com/shuoshuo/add_topic", method:"post", statId:350374}, add_one_blog:{api:"https://graph.qq.com/blog/add_one_blog", method:"post", statId:350375}, add_album:{api:"https://graph.qq.com/photo/add_album", method:"post", statId:350376}, upload_pic:{api:"https://graph.qq.com/photo/upload_pic", method:"post", statId:350377}, list_album:{api:"https://graph.qq.com/photo/list_album", method:"get", statId:350391}, add_share:{api:"https://graph.qq.com/share/add_share", method:"post", statId:350378}, check_page_fans:{api:"https://graph.qq.com/user/check_page_fans", method:"get", statId:350379}, add_t:{api:"https://graph.qq.com/t/add_t", method:"post", statId:350380}, add_pic_t:{api:" https://graph.qq.com/t/add_pic_t", method:"post", statId:350381}, del_t:{api:"https://graph.qq.com/t/del_t", method:"post", statId:350382}, get_repost_list:{api:"https://graph.qq.com/t/get_repost_list", method:"get", statId:350383}, get_info:{api:"https://graph.qq.com/user/get_info", method:"get", statId:350384}, get_other_info:{api:"https://graph.qq.com/user/get_other_info", method:"get", statId:350385}, get_fanslist:{api:"https://graph.qq.com/relation/get_fanslist", method:"get", statId:350386}, get_idollist:{api:"https://graph.qq.com/relation/get_idollist", method:"get", statId:350387}, add_idol:{api:"https://graph.qq.com/relation/add_idol", method:"get", statId:350388}, del_idol:{api:"https://graph.qq.com/relation/del_idol", method:"post", statId:350389}, get_tenpay_addr:{api:"https://graph.qq.com/cft_info/get_tenpay_addr", method:"get", statId:350390}};
        return function (l) {
            return i[l] || {}
        }
    }();
    (function () {
        var l = F("appid");
        var i = F("redirecturi");
        if (l) {
            e.Console.info("检测到自动初始化参数\nappId:" + l + "\nrUri:" + i);
            if (isNaN(l)) {
                e.Console.error("参数appid错误")
            } else {
                if (i && i.indexOf("http") != 0) {
                    e.Console.error("参数rediectURI错误")
                } else {
                    e.Event.domReady(function () {
                        e.init({appId:l, redirectURI:i})
                    })
                }
            }
        }
        var T = F("callback");
        if (T) {
            window._b_is_qc_cb_win = true;
            QC.Login.getMe(function (Z, U, V) {
                if (window.opener) {
                    QC.Console.info("cb_method_1:window.opener.QC.Login._onLoginBack");
                    try {
                        window.opener.QC.Login._onLoginBack(Z, U)
                    } catch (Y) {
                        QC.Console.info("cb_method_2:window.opener.postMessage");
                        try {
                            window.opener.postMessage("invoke@@@QC.Login._onLoginBack#" + [Z, U].join(","), "*")
                        } catch (aa) {
                            QC.Console.info("cb_method_3:QC.invoke");
                            try {
                                QC.invoke("QC.Login._onLoginBack", Z, U)
                            } catch (X) {
                                QC.Console.info("cb_method_5:[empty]")
                            }
                        }
                    }
                } else {
                    QC.Console.info("cb_method_4:QC.invoke");
                    try {
                        QC.invoke("QC.Login._onLoginBack", Z, U)
                    } catch (W) {
                    }
                }
                setTimeout(function () {
                    if (C > 7) {
                        var ab = window.open("about:blank", "_self");
                        ab.close()
                    } else {
                        window.close()
                    }
                }, 500)
            });
            QC.pv("graph.qq.com", "/open/connect/channel/pv")
        } else {
            if (l && QC.Login.check()) {
                QC.Event.domReady(function () {
                    QC.Login.getMe(function (V, U) {
                        QC.Login._onLoginBack(V, U, 1)
                    })
                });
                QC.pv("graph.qq.com", "/open/connect/logged_in/pv")
            } else {
                QC.pv("graph.qq.com", "/open/connect/pv")
            }
        }
    })()
})(QC);
(function () {
    window.qc = QC;
    if (typeof Object.freeze == "function") {
        Object.freeze(QC)
    }
})();
/*  |xGv00|ec5fa2b7c520bc33749cf835072be911 */